{% extends "base.html" %}
{% block head %}
    问题主页
{% endblock  %}

{% block content %}
    <ol class="breadcrumb" style="margin-bottom: 0;">
        <li><a href="#">问题管理</a></li>
        <li class="active">处理问题列表</li>
    </ol>
    <div>

        <div class="clearfix"  style="height: 36px;line-height: 35px;padding: 0 15px;border-top: 1px solid #dddddd;background-color: #f1f0f0;">
            <i class="fa fa-table" aria-hidden="true"></i>

        </div>

        <table class="table table-bordered">
            <thead>
            <tr>
                <th>问题标题</th>
                <th>状态</th>
                <th>创建时间</th>
                <th>提交者</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody>
            {% for row in result %}
                <tr>
                    <td>{{ row.title }}</td>
                    <td>{{ row.get_status_display }}</td>
                    <td>{{ row.ctime }}</td>
                    <td>{{ row.user.username }}</td>
                    <td>
                        <a class="btn btn-primary btn-xs" href="/questions/kill-{{ row.id }}">
                            <i class="fa fa-pencil-square-o" aria-hidden="true"></i>
                            {% if row.status == 1 %}
                            抢单
                            {% elif row.status == 2 %}
                            处理
                            {% elif row.status == 3 %}
                                解决方案
                            {% endif %}

                        </a>
                        |
                        <a class="btn btn-danger btn-xs">
                            <i class="fa fa-times" aria-hidden="true"></i>
                            删除
                        </a>
                        |
                        <a class="btn btn-primary btn-xs" href="">
                            <i class="fa fa-pencil-square-o" aria-hidden="true"></i>
                            编辑
                        </a>
                    </td>
                </tr>
            {% endfor %}

            </tbody>
        </table>
        <div class="clearfix">
            <ul class="pagination right" style="margin-top: 0">
               {{ page_str }}
            </ul>
        </div>
    </div>
{% endblock %}